package p270jp.pxv.android.activity;

import android.annotation.SuppressLint;
import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.PictureDrawable;
import android.os.Build;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.LinearInterpolator;
import android.view.inputmethod.InputMethodManager;
import android.webkit.URLUtil;
import android.widget.ImageView;
import androidx.activity.ComponentActivity;
import androidx.appcompat.app.AlertController;
import androidx.appcompat.app.AlertDialog;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.emoji2.text.RunnableC0624k;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.ViewModelStore;
import androidx.recyclerview.widget.AdapterListUpdateCallback;
import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestBuilder;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import org.greenrobot.eventbus.ThreadMode;
import p013ad.Action;
import p013ad.Consumer;
import p014ae.AbstractActivityC0070e3;
import p014ae.C0065d8;
import p014ae.C0073e8;
import p014ae.C0100j9;
import p014ae.C0123m7;
import p014ae.C0126n7;
import p014ae.C0135p4;
import p014ae.C0137p7;
import p014ae.C0144q7;
import p014ae.C0149r7;
import p014ae.C0184x7;
import p014ae.C0185y;
import p014ae.C0199z4;
import p014ae.View$OnClickListenerC0050b;
import p014ae.View$OnClickListenerC0090h7;
import p014ae.View$OnClickListenerC0156s7;
import p014ae.View$OnClickListenerC0159t4;
import p014ae.View$OnClickListenerC0161t7;
import p014ae.View$OnClickListenerC0163u;
import p014ae.View$OnClickListenerC0169u7;
import p014ae.View$OnClickListenerC0173v7;
import p014ae.View$OnClickListenerC0181w7;
import p029ap.Subscription;
import p045be.RenewalLiveChatRecyclerAdapter;
import p046bf.C1122c;
import p047bg.C1124a;
import p056bp.Duration;
import p060c2.Chain;
import p062c4.ViewBindings;
import p064c6.Executors;
import p064c6.Preconditions;
import p071cd.Functions;
import p071cd.ObjectHelper;
import p081cn.progressionUtil;
import p089d.C2424f;
import p134ei.AnalyticsAction;
import p134ei.AnalyticsScreenName;
import p134ei.PixivAnalytics;
import p148f7.RunnableC3037f;
import p165fo.Subscribe;
import p172g5.DecodeFormat;
import p180gd.FlowableObserveOn;
import p184gi.ScreenView;
import p187gl.PixivRequest;
import p187gl.PixivSketchRequest;
import p189gn.AbstractC3435a;
import p189gn.AbstractC3446l;
import p210hh.PixivAccountManager;
import p211hi.FirebaseAnalyticsAction;
import p216hn.Lambda;
import p216hn.Reflection;
import p225i5.DiskCacheStrategy;
import p232id.ObservableCreate;
import p232id.ObservableRetryWhen;
import p232id.ObservableTakeWhile;
import p258jd.SingleFlatMap;
import p258jd.SingleTimer;
import p258jd.SingleZipArray;
import p270jp.pxv.android.R;
import p270jp.pxv.android.activity.RenewalLiveActivity;
import p270jp.pxv.android.event.SelectGiftingItemEvent;
import p270jp.pxv.android.event.SendGiftingItemEvent;
import p270jp.pxv.android.event.ShowYellAmountFromLiveInformation;
import p270jp.pxv.android.event.UpdateMuteEvent;
import p270jp.pxv.android.fragment.GiftSelectBottomSheetFragment;
import p270jp.pxv.android.legacy.model.GoogleNg;
import p270jp.pxv.android.model.pixiv_sketch.AudienceCountUpdatedMessage;
import p270jp.pxv.android.model.pixiv_sketch.ChatMessage;
import p270jp.pxv.android.model.pixiv_sketch.FinishMessage;
import p270jp.pxv.android.model.pixiv_sketch.GiftingMessage;
import p270jp.pxv.android.model.pixiv_sketch.LeaveMessage;
import p270jp.pxv.android.model.pixiv_sketch.LiveErrorHandleType;
import p270jp.pxv.android.model.pixiv_sketch.LiveHlsMediaPlayer;
import p270jp.pxv.android.model.pixiv_sketch.PerformerThumbnailMessage;
import p270jp.pxv.android.model.pixiv_sketch.SketchLive;
import p270jp.pxv.android.model.pixiv_sketch.SketchLiveChat;
import p270jp.pxv.android.model.pixiv_sketch.SketchLiveGiftingItem;
import p270jp.pxv.android.model.pixiv_sketch.SketchPhoto;
import p270jp.pxv.android.model.pixiv_sketch.SketchPhotoMap;
import p270jp.pxv.android.model.pixiv_sketch.SketchUser;
import p270jp.pxv.android.model.pixiv_sketch.StreamMessage;
import p270jp.pxv.android.response.pixiv_sketch.PixivSketchResponse;
import p270jp.pxv.android.view.ClickableRecyclerView;
import p270jp.pxv.android.view.LiveChatEditText;
import p270jp.pxv.android.view.RenewalLiveView;
import p270jp.pxv.android.view.ZoomView;
import p274k2.ContextCompat;
import p294ko.ViewModelOwner;
import p307l9.EdgeTreatment;
import p314lg.ActivityRenewalLiveBinding;
import p314lg.ViewLiveFinishedBinding;
import p325m0.MutabilityOwnership;
import p350mp.Timber;
import p371nj.C5349c;
import p371nj.C5350d;
import p371nj.C5352e;
import p371nj.C5353f;
import p371nj.C5354g;
import p371nj.C5355h;
import p371nj.C5356i;
import p371nj.LiveAction;
import p371nj.LiveActionCreator;
import p371nj.LiveChatState;
import p371nj.LiveChatStore;
import p371nj.LiveErrorStore;
import p371nj.LiveGiftStore;
import p371nj.LiveInfoState;
import p371nj.LiveInfoStore;
import p371nj.LivePointStore;
import p371nj.LiveVideosState;
import p371nj.LiveVideosStore;
import p379o1.WordIterator;
import p397oj.C5456f;
import p397oj.LiveChatStateDiffRendererDispatcher;
import p397oj.LiveChatStateRenderer;
import p397oj.LiveInfoStateDiffRendererDispatcher;
import p397oj.LiveInfoStateRenderer;
import p397oj.LiveVideosStateDiffRendererDispatcher;
import p397oj.LiveVideosStateRenderer;
import p416pb.ConstructorConstructor;
import p436q6.StringMerger;
import p467rd.subscribers;
import p491sd.C6034a;
import p526tm.SlideInUpAnimator;
import p547uh.C6611y6;
import p547uh.GiftAmountBottomSheetFragment;
import p569vd.C6830b;
import p569vd.LiveSettings;
import p579vo.Qualifier;
import p593wc.AbstractC6902j;
import p593wc.AbstractC6904o;
import p593wc.Flowable;
import p593wc.FlowableSubscriber;
import p593wc.Single;
import p593wc.SingleSource;
import p603wm.AbstractC6949c;
import p603wm.Unit;
import p629xm._Collections;
import p639y6.C7297m;
import p645yc.AndroidSchedulers;
import p665z6.C7457l;
import p665z6.C7467v;
import p665z6.C7468w;
import p671zc.CompositeDisposable;
import p671zc.Disposable;
import p677zi.PixivImageLoader;

/* compiled from: RenewalLiveActivity.kt */
@SuppressLint({"RxJava2SubscribeMissingOnError"})
/* renamed from: jp.pxv.android.activity.RenewalLiveActivity */
/* loaded from: classes2.dex */
public final class RenewalLiveActivity extends AbstractActivityC0070e3 implements LiveInfoStateRenderer, LiveVideosStateRenderer, LiveChatStateRenderer {

    /* renamed from: y0 */
    public static final /* synthetic */ int f18570y0 = 0;

    /* renamed from: b0 */
    public ActivityRenewalLiveBinding f18571b0;

    /* renamed from: c0 */
    public String f18572c0;

    /* renamed from: e0 */
    public C1122c f18574e0;

    /* renamed from: m0 */
    public LiveInfoState f18582m0;

    /* renamed from: o0 */
    public LiveVideosState f18584o0;

    /* renamed from: q0 */
    public LiveChatState f18586q0;

    /* renamed from: u0 */
    public List<? extends View> f18590u0;

    /* renamed from: d0 */
    public final CompositeDisposable f18573d0 = new CompositeDisposable();

    /* renamed from: f0 */
    public final CompositeDisposable f18575f0 = new CompositeDisposable();

    /* renamed from: g0 */
    public final AbstractC6949c f18576g0 = Preconditions.m9802P(3, new C4107x(this, null, null, new C4106w(this), null));

    /* renamed from: h0 */
    public final AbstractC6949c f18577h0 = Preconditions.m9802P(3, new C4109z(this, null, null, new C4108y(this), null));

    /* renamed from: i0 */
    public final AbstractC6949c f18578i0 = Preconditions.m9802P(3, new C4080b0(this, null, null, new C4078a0(this), null));

    /* renamed from: j0 */
    public final AbstractC6949c f18579j0 = Preconditions.m9802P(3, new C4084d0(this, null, null, new C4082c0(this), null));

    /* renamed from: k0 */
    public final AbstractC6949c f18580k0 = Preconditions.m9802P(3, new C4105v(this, null, null, new C4086e0(this), null));

    /* renamed from: l0 */
    public final LiveInfoStateDiffRendererDispatcher f18581l0 = new LiveInfoStateDiffRendererDispatcher(this);

    /* renamed from: n0 */
    public final LiveVideosStateDiffRendererDispatcher f18583n0 = new LiveVideosStateDiffRendererDispatcher(this);

    /* renamed from: p0 */
    public final LiveChatStateDiffRendererDispatcher f18585p0 = new LiveChatStateDiffRendererDispatcher(this);

    /* renamed from: r0 */
    public final AbstractC6949c f18587r0 = Preconditions.m9802P(1, new C4103t(this, null, null));

    /* renamed from: s0 */
    public final AbstractC6949c f18588s0 = Preconditions.m9802P(1, new C4104u(this, null, null));

    /* renamed from: t0 */
    public final List<RenewalLiveView> f18589t0 = new ArrayList();

    /* renamed from: v0 */
    public final List<Disposable> f18591v0 = new ArrayList();

    /* renamed from: w0 */
    public Disposable f18592w0 = C2424f.m7739s();

    /* renamed from: x0 */
    public final RenewalLiveChatRecyclerAdapter f18593x0 = new RenewalLiveChatRecyclerAdapter(m4751j1());

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$a */
    /* loaded from: classes2.dex */
    public static final class C4077a extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18594a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4077a(ComponentActivity componentActivity) {
            super(0);
            this.f18594a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f18594a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$a0 */
    /* loaded from: classes2.dex */
    public static final class C4078a0 extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18595a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4078a0(ComponentActivity componentActivity) {
            super(0);
            this.f18595a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f18595a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$b */
    /* loaded from: classes2.dex */
    public static final class C4079b extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18596a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4079b(ComponentActivity componentActivity) {
            super(0);
            this.f18596a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f18596a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$b0 */
    /* loaded from: classes2.dex */
    public static final class C4080b0 extends Lambda implements AbstractC3435a<LiveVideosStore> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18597a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f18598b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4080b0(ComponentActivity componentActivity, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f18597a = componentActivity;
            this.f18598b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.t] */
        @Override // p189gn.AbstractC3435a
        public LiveVideosStore invoke() {
            return progressionUtil.m9685e(this.f18597a, null, null, this.f18598b, Reflection.m5499a(LiveVideosStore.class), null);
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$c */
    /* loaded from: classes2.dex */
    public static final class C4081c extends Lambda implements AbstractC3446l<Throwable, Unit> {

        /* renamed from: a */
        public static final C4081c f18599a = new C4081c();

        public C4081c() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(Throwable th) {
            Throwable th2 = th;
            MutabilityOwnership.m3745m(th2, "it");
            Timber.f23100a.mo3514p(th2);
            return Unit.f29503a;
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$c0 */
    /* loaded from: classes2.dex */
    public static final class C4082c0 extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18600a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4082c0(ComponentActivity componentActivity) {
            super(0);
            this.f18600a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f18600a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$d */
    /* loaded from: classes2.dex */
    public static final class C4083d extends Lambda implements AbstractC3446l<LiveInfoState, Unit> {
        public C4083d() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveInfoState pVar) {
            LiveInfoState pVar2 = pVar;
            LiveInfoStateDiffRendererDispatcher cVar = RenewalLiveActivity.this.f18581l0;
            MutabilityOwnership.m3746l(pVar2, "it");
            LiveInfoState pVar3 = RenewalLiveActivity.this.f18582m0;
            Objects.requireNonNull(cVar);
            String str = null;
            if (!MutabilityOwnership.m3749h(pVar2.f23931c, pVar3 == null ? null : pVar3.f23931c)) {
                cVar.f24296a.mo3239i(pVar2.f23931c);
            }
            if (!MutabilityOwnership.m3749h(pVar2.f23933e, pVar3 == null ? null : pVar3.f23933e)) {
                cVar.f24296a.mo3244E0(pVar2.f23933e);
            }
            long j = pVar2.f23934f;
            boolean z = true;
            if (!(pVar3 != null && j == pVar3.f23934f) || pVar2.f23935g != pVar3.f23935g) {
                cVar.f24296a.mo3245C0(j, pVar2.f23935g);
            }
            long j2 = pVar2.f23936h;
            if (!(pVar3 != null && j2 == pVar3.f23936h)) {
                cVar.f24296a.mo3238n(j2);
            }
            if (!MutabilityOwnership.m3749h(pVar2.f23938j, pVar3 == null ? null : pVar3.f23938j)) {
                cVar.f24296a.mo3243Q(pVar2.f23938j);
            }
            boolean z2 = pVar2.f23939k;
            if (!(pVar3 != null && z2 == pVar3.f23939k)) {
                cVar.f24296a.mo3241S(z2);
            }
            String str2 = pVar2.f23940l;
            if (pVar3 != null) {
                str = pVar3.f23940l;
            }
            if (!MutabilityOwnership.m3749h(str2, str)) {
                cVar.f24296a.mo3240e(pVar2.f23940l);
            }
            boolean z3 = pVar2.f23941m;
            if (pVar3 == null || z3 != pVar3.f23941m) {
                z = false;
            }
            if (!z) {
                cVar.f24296a.mo3242R(z3);
            }
            RenewalLiveActivity.this.f18582m0 = pVar2;
            return Unit.f29503a;
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$d0 */
    /* loaded from: classes2.dex */
    public static final class C4084d0 extends Lambda implements AbstractC3435a<LiveChatStore> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18602a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f18603b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4084d0(ComponentActivity componentActivity, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f18602a = componentActivity;
            this.f18603b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.k] */
        @Override // p189gn.AbstractC3435a
        public LiveChatStore invoke() {
            return progressionUtil.m9685e(this.f18602a, null, null, this.f18603b, Reflection.m5499a(LiveChatStore.class), null);
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$e */
    /* loaded from: classes2.dex */
    public static final class C4085e extends Lambda implements AbstractC3446l<LiveInfoState, Unit> {
        public C4085e() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveInfoState pVar) {
            LiveInfoState pVar2 = pVar;
            LiveSettings iVar = (LiveSettings) RenewalLiveActivity.this.f18587r0.getValue();
            boolean z = false;
            if (!iVar.f29087a.getBoolean(iVar.m1129a(R.string.preference_key_shown_live_tutorial_yell, new Object[0]), false) && pVar2.f23941m) {
                z = true;
            }
            if (z) {
                TimeUnit timeUnit = TimeUnit.SECONDS;
                AbstractC6904o oVar = C6034a.f26177b;
                Objects.requireNonNull(timeUnit, "unit is null");
                Objects.requireNonNull(oVar, "scheduler is null");
                Disposable h = subscribers.m2588h(new SingleTimer(2, timeUnit, oVar), null, new C4152c(RenewalLiveActivity.this), 1);
                CompositeDisposable aVar = RenewalLiveActivity.this.f18573d0;
                MutabilityOwnership.m3744n(aVar, "compositeDisposable");
                aVar.mo82c(h);
            }
            if (pVar2.f23941m) {
                RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
                PixivAnalytics eVar = renewalLiveActivity.f18757A;
                AnalyticsAction aVar2 = AnalyticsAction.SKETCH_LIVE_SHOW_YELL_ENABLE_LIVE;
                String str = renewalLiveActivity.f18572c0;
                if (str != null) {
                    eVar.m6527c(18, aVar2, str);
                } else {
                    MutabilityOwnership.m3737u("liveId");
                    throw null;
                }
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$e0 */
    /* loaded from: classes2.dex */
    public static final class C4086e0 extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18605a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4086e0(ComponentActivity componentActivity) {
            super(0);
            this.f18605a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f18605a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$f */
    /* loaded from: classes2.dex */
    public static final class C4087f extends Lambda implements AbstractC3446l<Throwable, Unit> {

        /* renamed from: a */
        public static final C4087f f18606a = new C4087f();

        public C4087f() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(Throwable th) {
            Throwable th2 = th;
            MutabilityOwnership.m3745m(th2, "it");
            Timber.f23100a.mo3514p(th2);
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$g */
    /* loaded from: classes2.dex */
    public static final class C4088g extends Lambda implements AbstractC3446l<LiveVideosState, Unit> {
        public C4088g() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveVideosState sVar) {
            List<LiveVideosState.C5376a> list;
            Long l;
            String str;
            LiveVideosState sVar2 = sVar;
            LiveVideosStateDiffRendererDispatcher eVar = RenewalLiveActivity.this.f18583n0;
            MutabilityOwnership.m3746l(sVar2, "it");
            LiveVideosState sVar3 = RenewalLiveActivity.this.f18584o0;
            Objects.requireNonNull(eVar);
            SketchPhotoMap sketchPhotoMap = null;
            if (sVar3 == null) {
                list = null;
            } else {
                list = sVar3.f23965a;
            }
            LiveVideosStateDiffRendererDispatcher.C5455a aVar = new LiveVideosStateDiffRendererDispatcher.C5455a(list, sVar2.f23965a);
            boolean z = true;
            DiffUtil.m10585a(aVar, true).m10584a(new C5456f(sVar2, eVar));
            if (!(MutabilityOwnership.m3749h(sVar2.f23965a, sVar3 == null ? null : sVar3.f23965a) && sVar2.f23966b == sVar3.f23966b && sVar2.f23967c == sVar3.f23967c && sVar2.f23970f == sVar3.f23970f && sVar2.f23968d == sVar3.f23968d)) {
                int i = 0;
                for (Object obj : sVar2.f23965a) {
                    int i2 = i + 1;
                    if (i >= 0) {
                        LiveVideosState.C5376a aVar2 = (LiveVideosState.C5376a) obj;
                        int i3 = sVar2.f23966b;
                        if (i == i3) {
                            eVar.f24297a.mo3229B(aVar2, i, i3, sVar2.f23967c, sVar2.f23970f, sVar2.f23968d);
                        }
                        eVar.f24297a.mo3229B(aVar2, i, sVar2.f23966b, sVar2.f23967c, sVar2.f23970f, sVar2.f23968d);
                        i = i2;
                    } else {
                        Chain.m9952H();
                        throw null;
                    }
                }
            }
            boolean z2 = sVar2.f23967c;
            if (!(sVar3 != null && z2 == sVar3.f23967c)) {
                eVar.f24297a.mo3227e0(z2);
            }
            if (!(sVar3 != null && sVar2.f23966b == sVar3.f23966b) || !MutabilityOwnership.m3749h(sVar2.f23965a, sVar3.f23965a)) {
                LiveVideosState.C5376a aVar3 = (LiveVideosState.C5376a) _Collections.m695S(sVar2.f23965a, sVar2.f23966b);
                LiveVideosStateRenderer gVar = eVar.f24297a;
                int i4 = sVar2.f23966b;
                if (aVar3 == null) {
                    l = null;
                } else {
                    l = Long.valueOf(aVar3.f23973b);
                }
                if (aVar3 == null) {
                    str = null;
                } else {
                    str = aVar3.f23974c;
                }
                if (aVar3 != null) {
                    sketchPhotoMap = aVar3.f23975d;
                }
                gVar.mo3226l(i4, l, str, sketchPhotoMap);
            }
            boolean z3 = sVar2.f23969e;
            if (!(sVar3 != null && z3 == sVar3.f23969e)) {
                eVar.f24297a.mo3223w(z3);
            }
            boolean z4 = sVar2.f23971g;
            if (sVar3 == null || z4 != sVar3.f23971g) {
                z = false;
            }
            if (!z) {
                eVar.f24297a.mo3228F(z4);
            }
            RenewalLiveActivity.this.f18584o0 = sVar2;
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$h */
    /* loaded from: classes2.dex */
    public static final class C4089h extends Lambda implements AbstractC3446l<Throwable, Unit> {

        /* renamed from: a */
        public static final C4089h f18608a = new C4089h();

        public C4089h() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(Throwable th) {
            Throwable th2 = th;
            MutabilityOwnership.m3745m(th2, "it");
            Timber.f23100a.mo3514p(th2);
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$i */
    /* loaded from: classes2.dex */
    public static final class C4090i extends Lambda implements AbstractC3446l<LiveChatState, Unit> {
        public C4090i() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveChatState jVar) {
            LiveChatState jVar2 = jVar;
            LiveChatStateDiffRendererDispatcher aVar = RenewalLiveActivity.this.f18585p0;
            MutabilityOwnership.m3746l(jVar2, "it");
            LiveChatState jVar3 = RenewalLiveActivity.this.f18586q0;
            Objects.requireNonNull(aVar);
            Integer num = null;
            if (!MutabilityOwnership.m3749h(jVar2.f23869a, jVar3 == null ? null : jVar3.f23869a)) {
                aVar.f24295a.mo3247j0(jVar2.f23869a);
            }
            if (!MutabilityOwnership.m3749h(jVar2.f23870b, jVar3 == null ? null : jVar3.f23870b)) {
                aVar.f24295a.mo3248X(jVar2.f23870b);
            }
            boolean z = jVar2.f23871c;
            boolean z2 = true;
            if (!(jVar3 != null && z == jVar3.f23871c)) {
                aVar.f24295a.mo3250H(z);
            }
            boolean z3 = jVar2.f23872d;
            if (jVar3 == null || z3 != jVar3.f23872d) {
                z2 = false;
            }
            if (!z2) {
                aVar.f24295a.mo3246z0(z3);
            }
            Integer num2 = jVar2.f23873e;
            if (jVar3 != null) {
                num = jVar3.f23873e;
            }
            if (!MutabilityOwnership.m3749h(num2, num)) {
                aVar.f24295a.mo3249K(jVar2.f23873e);
            }
            RenewalLiveActivity.this.f18586q0 = jVar2;
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$j */
    /* loaded from: classes2.dex */
    public static final class C4091j extends Lambda implements AbstractC3446l<List<? extends LiveChatState.C5361e>, Unit> {
        public C4091j() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(List<? extends LiveChatState.C5361e> list) {
            List<? extends LiveChatState.C5361e> list2 = list;
            RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
            MutabilityOwnership.m3746l(list2, "it");
            int i = RenewalLiveActivity.f18570y0;
            Objects.requireNonNull(renewalLiveActivity);
            if (!list2.isEmpty()) {
                LiveChatState.C5361e eVar = (LiveChatState.C5361e) list2.get(0);
                long j = eVar.f23889c;
                int i2 = eVar.f23890d;
                if (renewalLiveActivity.f18591v0.size() >= 5) {
                    renewalLiveActivity.f18591v0.remove(0).mo78a();
                }
                renewalLiveActivity.f18591v0.add(new ObservableTakeWhile(AbstractC6902j.m988m(0, 200, TimeUnit.MILLISECONDS), new C0149r7(j, 0)).m986o(AndroidSchedulers.m334a()).m984q(new C0144q7(renewalLiveActivity, i2), Functions.f5388e, Functions.f5386c, Functions.f5387d));
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$k */
    /* loaded from: classes2.dex */
    public static final class C4092k implements FlowableSubscriber<SketchLiveGiftingItem> {

        /* renamed from: a */
        public Subscription f18611a;

        public C4092k() {
        }

        @Override // p029ap.Subscriber
        /* renamed from: b */
        public void mo2795b(Throwable th) {
            MutabilityOwnership.m3745m(th, "throwable");
            Timber.f23100a.mo3514p(th);
        }

        @Override // p593wc.FlowableSubscriber, p029ap.Subscriber
        /* renamed from: c */
        public void mo1002c(Subscription bVar) {
            this.f18611a = bVar;
            bVar.mo2792d(1);
        }

        @Override // p029ap.Subscriber
        /* renamed from: g */
        public void mo2794g(Object obj) {
            SketchLiveGiftingItem sketchLiveGiftingItem = (SketchLiveGiftingItem) obj;
            MutabilityOwnership.m3745m(sketchLiveGiftingItem, "item");
            RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
            int i = RenewalLiveActivity.f18570y0;
            Objects.requireNonNull(renewalLiveActivity);
            String str = sketchLiveGiftingItem.image.svg.url;
            MutabilityOwnership.m3746l(str, "item.image.svg.url");
            C0184x7 x7Var = new C0184x7(renewalLiveActivity);
            if (!renewalLiveActivity.isDestroyed()) {
                RequestBuilder P = Glide.m9615e(renewalLiveActivity).mo1137a(PictureDrawable.class).mo464g(DiskCacheStrategy.f16819c).mo461j(DecodeFormat.PREFER_ARGB_8888).mo1140P(str);
                P.m9610K(x7Var, null, P, Executors.f5346a);
            }
            ViewBindings.m9836a(subscribers.m2589g(AbstractC6902j.m981t(200, TimeUnit.MILLISECONDS), null, null, new C4153d(this), 3), RenewalLiveActivity.this.f18573d0);
        }

        @Override // p029ap.Subscriber
        public void onComplete() {
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$l */
    /* loaded from: classes2.dex */
    public static final class C4093l extends Lambda implements AbstractC3446l<Unit, Unit> {
        public C4093l() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(Unit jVar) {
            RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
            int i = RenewalLiveActivity.f18570y0;
            renewalLiveActivity.m4756e1();
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$m */
    /* loaded from: classes2.dex */
    public static final class C4094m extends Lambda implements AbstractC3446l<LiveErrorHandleType, Unit> {
        public C4094m() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(LiveErrorHandleType liveErrorHandleType) {
            LiveErrorHandleType liveErrorHandleType2 = liveErrorHandleType;
            MutabilityOwnership.m3745m(liveErrorHandleType2, "it");
            if (liveErrorHandleType2 instanceof LiveErrorHandleType.RetryLiveFetch) {
                RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
                int i = RenewalLiveActivity.f18570y0;
                renewalLiveActivity.m4755f1();
            } else if (liveErrorHandleType2 instanceof LiveErrorHandleType.CloseLive) {
                RenewalLiveActivity.this.finish();
            } else if (liveErrorHandleType2 instanceof LiveErrorHandleType.RetryAllGiftFetch) {
                RenewalLiveActivity renewalLiveActivity2 = RenewalLiveActivity.this;
                int i2 = RenewalLiveActivity.f18570y0;
                renewalLiveActivity2.m4754g1().m3358e();
            } else if (liveErrorHandleType2 instanceof LiveErrorHandleType.RetrySendChat) {
                RenewalLiveActivity renewalLiveActivity3 = RenewalLiveActivity.this;
                int i3 = RenewalLiveActivity.f18570y0;
                renewalLiveActivity3.m4745p1();
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$n */
    /* loaded from: classes2.dex */
    public static final class C4095n extends Lambda implements AbstractC3446l<Long, Unit> {
        public C4095n() {
            super(1);
        }

        @Override // p189gn.AbstractC3446l
        public Unit invoke(Long l) {
            ActivityRenewalLiveBinding j1Var = RenewalLiveActivity.this.f18571b0;
            if (j1Var != null) {
                j1Var.f21730Q.setRotation(0.0f);
                ActivityRenewalLiveBinding j1Var2 = RenewalLiveActivity.this.f18571b0;
                if (j1Var2 != null) {
                    j1Var2.f21730Q.animate().setInterpolator(new LinearInterpolator()).setDuration(16000).rotation(360.0f).start();
                    return Unit.f29503a;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$o */
    /* loaded from: classes2.dex */
    public static final class C4096o implements RecyclerView.AbstractC0806o {

        /* renamed from: a */
        public float f18616a;

        /* renamed from: b */
        public float f18617b;

        /* renamed from: c */
        public int f18618c = 1;

        /* renamed from: d */
        public final GestureDetector f18619d;

        /* renamed from: e */
        public final GestureDetector f18620e;

        /* compiled from: RenewalLiveActivity.kt */
        /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$o$a */
        /* loaded from: classes2.dex */
        public static final class C4097a extends GestureDetector.SimpleOnGestureListener {

            /* renamed from: a */
            public final /* synthetic */ RenewalLiveActivity f18621a;

            public C4097a(RenewalLiveActivity renewalLiveActivity) {
                this.f18621a = renewalLiveActivity;
            }

            @Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnDoubleTapListener
            public boolean onDoubleTap(MotionEvent motionEvent) {
                MutabilityOwnership.m3745m(motionEvent, "event");
                ActivityRenewalLiveBinding j1Var = this.f18621a.f18571b0;
                if (j1Var != null) {
                    j1Var.f21740g0.m4454u(motionEvent);
                    return true;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        }

        /* compiled from: RenewalLiveActivity.kt */
        /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$o$b */
        /* loaded from: classes2.dex */
        public static final class C4098b extends GestureDetector.SimpleOnGestureListener {

            /* renamed from: b */
            public final /* synthetic */ RenewalLiveActivity f18623b;

            public C4098b(RenewalLiveActivity renewalLiveActivity) {
                this.f18623b = renewalLiveActivity;
            }

            @Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
            public boolean onDown(MotionEvent motionEvent) {
                C4096o oVar = C4096o.this;
                Objects.requireNonNull(oVar);
                oVar.f18618c = 1;
                return super.onDown(motionEvent);
            }

            @Override // android.view.GestureDetector.SimpleOnGestureListener, android.view.GestureDetector.OnGestureListener
            public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
                int i;
                MutabilityOwnership.m3745m(motionEvent, "e1");
                MutabilityOwnership.m3745m(motionEvent2, "e2");
                C4096o oVar = C4096o.this;
                if (oVar.f18618c == 1) {
                    if (Math.abs(f) <= Math.abs(f2)) {
                        ActivityRenewalLiveBinding j1Var = this.f18623b.f18571b0;
                        if (j1Var != null) {
                            int height = j1Var.f21759w.getHeight();
                            ActivityRenewalLiveBinding j1Var2 = this.f18623b.f18571b0;
                            if (j1Var2 == null) {
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            } else if (height <= j1Var2.f21759w.computeVerticalScrollRange()) {
                                i = 3;
                                oVar.f18618c = i;
                            }
                        } else {
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                    }
                    i = 2;
                    oVar.f18618c = i;
                }
                if (C4096o.this.f18618c != 2) {
                    return false;
                }
                ActivityRenewalLiveBinding j1Var3 = this.f18623b.f18571b0;
                if (j1Var3 != null) {
                    ZoomView zoomView = j1Var3.f21740g0;
                    float targetZoom = zoomView.getTargetZoom();
                    ActivityRenewalLiveBinding j1Var4 = this.f18623b.f18571b0;
                    if (j1Var4 != null) {
                        float targetTransX = j1Var4.f21740g0.getTargetTransX();
                        ActivityRenewalLiveBinding j1Var5 = this.f18623b.f18571b0;
                        if (j1Var5 != null) {
                            float targetZoom2 = (f / j1Var5.f21740g0.getTargetZoom()) + targetTransX;
                            ActivityRenewalLiveBinding j1Var6 = this.f18623b.f18571b0;
                            if (j1Var6 != null) {
                                float targetTransY = j1Var6.f21740g0.getTargetTransY();
                                ActivityRenewalLiveBinding j1Var7 = this.f18623b.f18571b0;
                                if (j1Var7 != null) {
                                    zoomView.m4453v(targetZoom, targetZoom2, (f2 / j1Var7.f21740g0.getTargetZoom()) + targetTransY);
                                    return false;
                                }
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        }

        public C4096o(RenewalLiveActivity renewalLiveActivity) {
            this.f18619d = new GestureDetector(renewalLiveActivity, new C4097a(renewalLiveActivity));
            this.f18620e = new GestureDetector(renewalLiveActivity, new C4098b(renewalLiveActivity));
        }

        @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0806o
        /* renamed from: a */
        public void mo4743a(RecyclerView recyclerView, MotionEvent motionEvent) {
            MutabilityOwnership.m3745m(motionEvent, "event");
        }

        @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0806o
        /* renamed from: b */
        public boolean mo4742b(RecyclerView recyclerView, MotionEvent motionEvent) {
            if (this.f18619d.onTouchEvent(motionEvent)) {
                return true;
            }
            int action = motionEvent.getAction();
            if (action == 0 || action == 5) {
                this.f18616a = motionEvent.getX();
                this.f18617b = motionEvent.getY();
            }
            this.f18620e.onTouchEvent(motionEvent);
            if (this.f18618c != 2) {
                return false;
            }
            motionEvent.setLocation(this.f18616a, this.f18617b);
            return false;
        }

        @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0806o
        /* renamed from: c */
        public void mo4741c(boolean z) {
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$p */
    /* loaded from: classes2.dex */
    public static final class C4099p implements TextWatcher {
        public C4099p() {
        }

        @Override // android.text.TextWatcher
        public void afterTextChanged(Editable editable) {
            MutabilityOwnership.m3745m(editable, "editable");
        }

        @Override // android.text.TextWatcher
        public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
            MutabilityOwnership.m3745m(charSequence, "charSequence");
        }

        @Override // android.text.TextWatcher
        public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
            MutabilityOwnership.m3745m(charSequence, "charSequence");
            RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
            int i4 = RenewalLiveActivity.f18570y0;
            LiveActionCreator g1 = renewalLiveActivity.m4754g1();
            String obj = charSequence.toString();
            Objects.requireNonNull(g1);
            MutabilityOwnership.m3745m(obj, "text");
            g1.f23822c.mo2437b(new LiveAction.C5311m0(obj));
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$q */
    /* loaded from: classes2.dex */
    public static final class ViewTreeObserver$OnGlobalLayoutListenerC4100q implements ViewTreeObserver.OnGlobalLayoutListener {
        public ViewTreeObserver$OnGlobalLayoutListenerC4100q() {
        }

        @Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
        public void onGlobalLayout() {
            ActivityRenewalLiveBinding j1Var = RenewalLiveActivity.this.f18571b0;
            if (j1Var != null) {
                ClickableRecyclerView clickableRecyclerView = j1Var.f21759w;
                if (clickableRecyclerView.getHeight() < clickableRecyclerView.computeVerticalScrollRange()) {
                    clickableRecyclerView.setVerticalFadingEdgeEnabled(true);
                    clickableRecyclerView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
                    return;
                }
                return;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$r */
    /* loaded from: classes2.dex */
    public static final class C4101r extends Lambda implements AbstractC3435a<Unit> {

        /* renamed from: a */
        public final /* synthetic */ LiveVideosState.C5376a f18626a;

        /* renamed from: b */
        public final /* synthetic */ RenewalLiveActivity f18627b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4101r(LiveVideosState.C5376a aVar, RenewalLiveActivity renewalLiveActivity) {
            super(0);
            this.f18626a = aVar;
            this.f18627b = renewalLiveActivity;
        }

        @Override // p189gn.AbstractC3435a
        public Unit invoke() {
            LiveVideosState.C5376a aVar = this.f18626a;
            String str = aVar.f23976e;
            if (str != null) {
                RenewalLiveActivity renewalLiveActivity = this.f18627b;
                int i = RenewalLiveActivity.f18570y0;
                renewalLiveActivity.m4754g1().m3353j(aVar.f23972a, str);
            }
            return Unit.f29503a;
        }
    }

    /* compiled from: RenewalLiveActivity.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$s */
    /* loaded from: classes2.dex */
    public static final class C4102s extends Lambda implements AbstractC3435a<Unit> {

        /* renamed from: b */
        public final /* synthetic */ LiveVideosState.C5376a f18629b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4102s(LiveVideosState.C5376a aVar) {
            super(0);
            this.f18629b = aVar;
        }

        @Override // p189gn.AbstractC3435a
        public Unit invoke() {
            RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
            int i = RenewalLiveActivity.f18570y0;
            renewalLiveActivity.m4754g1().f23822c.mo2437b(new LiveAction.C5316p(this.f18629b.f23972a));
            return Unit.f29503a;
        }
    }

    /* compiled from: ComponentCallbackExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$t */
    /* loaded from: classes2.dex */
    public static final class C4103t extends Lambda implements AbstractC3435a<LiveSettings> {

        /* renamed from: a */
        public final /* synthetic */ ComponentCallbacks f18630a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4103t(ComponentCallbacks componentCallbacks, Qualifier aVar, AbstractC3435a aVar2) {
            super(0);
            this.f18630a = componentCallbacks;
        }

        /* JADX WARN: Type inference failed for: r0v4, types: [java.lang.Object, vd.i] */
        @Override // p189gn.AbstractC3435a
        public final LiveSettings invoke() {
            return C1124a.m10173s(this.f18630a).f24118a.m920a().m621a(Reflection.m5499a(LiveSettings.class), null, null);
        }
    }

    /* compiled from: ComponentCallbackExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$u */
    /* loaded from: classes2.dex */
    public static final class C4104u extends Lambda implements AbstractC3435a<PixivImageLoader> {

        /* renamed from: a */
        public final /* synthetic */ ComponentCallbacks f18631a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4104u(ComponentCallbacks componentCallbacks, Qualifier aVar, AbstractC3435a aVar2) {
            super(0);
            this.f18631a = componentCallbacks;
        }

        /* JADX WARN: Type inference failed for: r0v4, types: [java.lang.Object, zi.a] */
        @Override // p189gn.AbstractC3435a
        public final PixivImageLoader invoke() {
            return C1124a.m10173s(this.f18631a).f24118a.m920a().m621a(Reflection.m5499a(PixivImageLoader.class), null, null);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$v */
    /* loaded from: classes2.dex */
    public static final class C4105v extends Lambda implements AbstractC3435a<LiveErrorStore> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18632a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f18633b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4105v(ComponentActivity componentActivity, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f18632a = componentActivity;
            this.f18633b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.m] */
        @Override // p189gn.AbstractC3435a
        public LiveErrorStore invoke() {
            return progressionUtil.m9685e(this.f18632a, null, null, this.f18633b, Reflection.m5499a(LiveErrorStore.class), null);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$w */
    /* loaded from: classes2.dex */
    public static final class C4106w extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18634a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4106w(ComponentActivity componentActivity) {
            super(0);
            this.f18634a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f18634a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$x */
    /* loaded from: classes2.dex */
    public static final class C4107x extends Lambda implements AbstractC3435a<LiveActionCreator> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18635a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f18636b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4107x(ComponentActivity componentActivity, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f18635a = componentActivity;
            this.f18636b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.b] */
        @Override // p189gn.AbstractC3435a
        public LiveActionCreator invoke() {
            return progressionUtil.m9685e(this.f18635a, null, null, this.f18636b, Reflection.m5499a(LiveActionCreator.class), null);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$y */
    /* loaded from: classes2.dex */
    public static final class C4108y extends Lambda implements AbstractC3435a<ViewModelOwner> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18637a;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4108y(ComponentActivity componentActivity) {
            super(0);
            this.f18637a = componentActivity;
        }

        @Override // p189gn.AbstractC3435a
        public ViewModelOwner invoke() {
            ComponentActivity componentActivity = this.f18637a;
            MutabilityOwnership.m3745m(componentActivity, "storeOwner");
            ViewModelStore viewModelStore = componentActivity.getViewModelStore();
            MutabilityOwnership.m3746l(viewModelStore, "storeOwner.viewModelStore");
            return new ViewModelOwner(viewModelStore, componentActivity);
        }
    }

    /* compiled from: ActivityExt.kt */
    /* renamed from: jp.pxv.android.activity.RenewalLiveActivity$z */
    /* loaded from: classes2.dex */
    public static final class C4109z extends Lambda implements AbstractC3435a<LiveInfoStore> {

        /* renamed from: a */
        public final /* synthetic */ ComponentActivity f18638a;

        /* renamed from: b */
        public final /* synthetic */ AbstractC3435a f18639b;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public C4109z(ComponentActivity componentActivity, Qualifier aVar, AbstractC3435a aVar2, AbstractC3435a aVar3, AbstractC3435a aVar4) {
            super(0);
            this.f18638a = componentActivity;
            this.f18639b = aVar3;
        }

        /* JADX WARN: Type inference failed for: r0v1, types: [androidx.lifecycle.j0, nj.q] */
        @Override // p189gn.AbstractC3435a
        public LiveInfoStore invoke() {
            return progressionUtil.m9685e(this.f18638a, null, null, this.f18639b, Reflection.m5499a(LiveInfoStore.class), null);
        }
    }

    @Override // p397oj.LiveVideosStateRenderer
    /* renamed from: B */
    public void mo3229B(LiveVideosState.C5376a aVar, int i, int i2, boolean z, boolean z2, boolean z3) {
        SketchPhoto sketchPhoto;
        String str;
        MutabilityOwnership.m3745m(aVar, "videoState");
        if (i == i2) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                RenewalLiveView renewalLiveView = j1Var.f21727N;
                MutabilityOwnership.m3746l(renewalLiveView, "binding.mainVideo");
                m4746o1(renewalLiveView, aVar, true, true, true);
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    RenewalLiveView renewalLiveView2 = j1Var2.f21727N;
                    MutabilityOwnership.m3746l(renewalLiveView2, "binding.mainVideo");
                    m4747n1(renewalLiveView2, aVar, true, true, z3);
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        }
        m4746o1(this.f18589t0.get(i), aVar, i == i2, false, z);
        if (z2) {
            m4747n1(this.f18589t0.get(i), aVar, i == i2, false, z3);
            return;
        }
        RenewalLiveView renewalLiveView3 = this.f18589t0.get(i);
        SketchPhotoMap sketchPhotoMap = aVar.f23977f;
        if (sketchPhotoMap != null && (sketchPhoto = sketchPhotoMap.w160) != null && (str = sketchPhoto.url) != null) {
            renewalLiveView3.setThumbnailImageURL(str);
        }
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: C0 */
    public void mo3245C0(long j, long j2) {
        NumberFormat numberInstance = NumberFormat.getNumberInstance(Locale.US);
        String str = numberInstance.format(j) + '/' + ((Object) numberInstance.format(j2));
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.f21752r.setText(str);
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: E0 */
    public void mo3244E0(SketchPhotoMap sketchPhotoMap) {
        SketchPhoto sketchPhoto;
        String str = (sketchPhotoMap == null || (sketchPhoto = sketchPhotoMap.w400) == null) ? null : sketchPhoto.url;
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3787z(str);
            ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
            if (j1Var2 != null) {
                ImageView imageView = j1Var2.f21754s;
                MutabilityOwnership.m3746l(imageView, "binding.backgroundImage");
                if (str == null) {
                    return;
                }
                if (URLUtil.isHttpsUrl(str) || URLUtil.isHttpUrl(str)) {
                    PixivImageLoader j1 = m4751j1();
                    Context context = imageView.getContext();
                    MutabilityOwnership.m3746l(context, "imageView.context");
                    j1.m61e(context, str, imageView, 80, 2);
                    return;
                }
                return;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
        MutabilityOwnership.m3737u("binding");
        throw null;
    }

    @Override // p397oj.LiveVideosStateRenderer
    /* renamed from: F */
    public void mo3228F(boolean z) {
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3795J(z);
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // p397oj.LiveChatStateRenderer
    /* renamed from: H */
    public void mo3250H(boolean z) {
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3794L(z);
            ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
            if (j1Var2 != null) {
                j1Var2.f21731R.setOnClickListener(new View.OnClickListener(z, this) { // from class: ae.j7

                    /* renamed from: a */
                    public final /* synthetic */ boolean f417a;

                    /* renamed from: b */
                    public final /* synthetic */ RenewalLiveActivity f418b;

                    {
                        this.f417a = r1;
                        this.f418b = r2;
                    }

                    @Override // android.view.View.OnClickListener
                    public final void onClick(View view) {
                        boolean z2 = this.f417a;
                        RenewalLiveActivity renewalLiveActivity = this.f418b;
                        int i = RenewalLiveActivity.f18570y0;
                        MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                        if (z2) {
                            renewalLiveActivity.m4745p1();
                        }
                    }
                });
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // p397oj.LiveChatStateRenderer
    /* renamed from: K */
    public void mo3249K(Integer num) {
        if (num != null) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                j1Var.mo3792N(num);
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    j1Var2.f21721H.setOnClickListener(new View$OnClickListenerC0090h7(this, num));
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        }
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: Q */
    public void mo3243Q(Duration eVar) {
        MutabilityOwnership.m3745m(eVar, "elapsedDuration");
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3800A(eVar);
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: R */
    public void mo3242R(boolean z) {
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3797G(z);
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: S */
    public void mo3241S(boolean z) {
        if (z) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                ViewLiveFinishedBinding t9Var = j1Var.f21726M;
                ConstraintLayout constraintLayout = t9Var == null ? null : t9Var.f22290q;
                if (constraintLayout != null) {
                    constraintLayout.setVisibility(0);
                }
                getWindow().clearFlags(128);
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    j1Var2.f21727N.m4471b();
                    for (RenewalLiveView renewalLiveView : this.f18589t0) {
                        renewalLiveView.m4471b();
                    }
                    return;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
        getWindow().addFlags(128);
    }

    @Override // p397oj.LiveChatStateRenderer
    /* renamed from: X */
    public void mo3248X(String str) {
        MutabilityOwnership.m3745m(str, "chatInputText");
        if (str.length() == 0) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                Editable text = j1Var.f21757u.getText();
                if (text != null) {
                    text.clear();
                    return;
                }
                return;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // android.app.Activity, android.view.Window.Callback
    public boolean dispatchTouchEvent(MotionEvent motionEvent) {
        MutabilityOwnership.m3745m(motionEvent, "event");
        if (motionEvent.getPointerCount() > 1) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                j1Var.f21740g0.dispatchTouchEvent(motionEvent);
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        } else {
            super.dispatchTouchEvent(motionEvent);
        }
        return true;
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: e */
    public void mo3240e(String str) {
        MutabilityOwnership.m3745m(str, "shareText");
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.f21732Y.setOnClickListener(new View$OnClickListenerC0156s7(this, str, 0));
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Override // p397oj.LiveVideosStateRenderer
    /* renamed from: e0 */
    public void mo3227e0(boolean z) {
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3793M(z);
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    /* renamed from: e1 */
    public final void m4756e1() {
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            RecyclerView.LayoutManager layoutManager = j1Var.f21759w.getLayoutManager();
            Objects.requireNonNull(layoutManager, "null cannot be cast to non-null type androidx.recyclerview.widget.LinearLayoutManager");
            LinearLayoutManager linearLayoutManager = (LinearLayoutManager) layoutManager;
            linearLayoutManager.m10918x1(linearLayoutManager.m10807T() - 1, 0);
            return;
        }
        MutabilityOwnership.m3737u("binding");
        throw null;
    }

    /* renamed from: f1 */
    public final void m4755f1() {
        if (ConstructorConstructor.m3047b(this)) {
            LiveActionCreator g1 = m4754g1();
            String str = this.f18572c0;
            if (str != null) {
                Objects.requireNonNull(g1);
                Single<PixivSketchResponse<SketchLive>> g = g1.f23824e.m10217g(str);
                MutabilityOwnership.m3746l(g, "pixivSketchService.getLive(liveId)");
                SingleZipArray sVar = new SingleZipArray(new SingleSource[]{g, PixivRequest.m5814c()}, new Functions.C1166b(WordIterator.f24138a));
                AbstractC6904o oVar = C6034a.f26178c;
                Disposable e = subscribers.m2591e(sVar.m961o(oVar), new C5353f(g1), new C5354g(g1));
                CompositeDisposable aVar = g1.f23828i;
                MutabilityOwnership.m3744n(aVar, "compositeDisposable");
                aVar.mo82c(e);
                LiveActionCreator g12 = m4754g1();
                String str2 = this.f18572c0;
                if (str2 != null) {
                    Objects.requireNonNull(g12);
                    Disposable e2 = subscribers.m2591e(g12.f23824e.m10214j(str2).m961o(oVar), C5349c.f23860a, new C5350d(g12));
                    CompositeDisposable aVar2 = g12.f23828i;
                    MutabilityOwnership.m3744n(aVar2, "compositeDisposable");
                    aVar2.mo82c(e2);
                    if (!g12.f23831l.mo77e()) {
                        g12.f23831l.mo78a();
                    }
                    Disposable g2 = subscribers.m2589g(g12.f23836q.m995e(3, TimeUnit.SECONDS).m990k(C7468w.f31295l), null, null, new C5352e(g12, str2), 3);
                    CompositeDisposable aVar3 = g12.f23828i;
                    MutabilityOwnership.m3744n(aVar3, "compositeDisposable");
                    aVar3.mo82c(g2);
                    g12.f23831l = g2;
                    m4754g1().m3358e();
                    return;
                }
                MutabilityOwnership.m3737u("liveId");
                throw null;
            }
            MutabilityOwnership.m3737u("liveId");
            throw null;
        }
        m4754g1().f23822c.mo2437b(LiveAction.C5287a0.f23769a);
    }

    /* renamed from: g1 */
    public final LiveActionCreator m4754g1() {
        return (LiveActionCreator) this.f18576g0.getValue();
    }

    /* renamed from: h1 */
    public final LiveChatStore m4753h1() {
        return (LiveChatStore) this.f18579j0.getValue();
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: i */
    public void mo3239i(String str) {
        MutabilityOwnership.m3745m(str, AppMeasurementSdk.ConditionalUserProperty.NAME);
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3791P(str);
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    /* renamed from: i1 */
    public final LiveInfoStore m4752i1() {
        return (LiveInfoStore) this.f18577h0.getValue();
    }

    @Override // p397oj.LiveChatStateRenderer
    /* renamed from: j0 */
    public void mo3247j0(List<? extends LiveChatState.AbstractC5359c> list) {
        MutabilityOwnership.m3745m(list, "chatItems");
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            RecyclerView.LayoutManager layoutManager = j1Var.f21759w.getLayoutManager();
            Objects.requireNonNull(layoutManager, "null cannot be cast to non-null type androidx.recyclerview.widget.LinearLayoutManager");
            LinearLayoutManager linearLayoutManager = (LinearLayoutManager) layoutManager;
            int J = linearLayoutManager.m10824J();
            int g1 = linearLayoutManager.m10935g1();
            boolean z = g1 < 0 || g1 + J >= linearLayoutManager.m10807T();
            RenewalLiveChatRecyclerAdapter y1Var = this.f18593x0;
            Objects.requireNonNull(y1Var);
            DiffUtil.m10585a(new RenewalLiveChatRecyclerAdapter.C1119a(y1Var.f4966e, list), true).m10584a(new AdapterListUpdateCallback(y1Var));
            y1Var.f4966e = list;
            if (z) {
                m4756e1();
                return;
            }
            return;
        }
        MutabilityOwnership.m3737u("binding");
        throw null;
    }

    /* renamed from: j1 */
    public final PixivImageLoader m4751j1() {
        return (PixivImageLoader) this.f18588s0.getValue();
    }

    /* renamed from: k1 */
    public final C1122c m4750k1() {
        C1122c cVar = this.f18574e0;
        if (cVar != null) {
            return cVar;
        }
        MutabilityOwnership.m3737u("webSocketClient");
        throw null;
    }

    @Override // p397oj.LiveVideosStateRenderer
    /* renamed from: l */
    public void mo3226l(int i, Long l, String str, SketchPhotoMap sketchPhotoMap) {
        SketchPhoto sketchPhoto;
        ConstraintSet bVar = new ConstraintSet();
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            bVar.m11474c(j1Var.f21761y);
            for (Number number : Chain.m9925y(1, 3, 2, 4)) {
                int intValue = number.intValue();
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    int id = j1Var2.f21730Q.getId();
                    List<? extends View> list = this.f18590u0;
                    if (list != null) {
                        bVar.m11473d(id, intValue, ((View) list.get(i)).getId(), intValue);
                        ActivityRenewalLiveBinding j1Var3 = this.f18571b0;
                        if (j1Var3 != null) {
                            int id2 = j1Var3.f21729P.getId();
                            List<? extends View> list2 = this.f18590u0;
                            if (list2 != null) {
                                bVar.m11473d(id2, intValue, ((View) list2.get(i)).getId(), intValue);
                            } else {
                                MutabilityOwnership.m3737u("videoContainers");
                                throw null;
                            }
                        } else {
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                    } else {
                        MutabilityOwnership.m3737u("videoContainers");
                        throw null;
                    }
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            }
            ActivityRenewalLiveBinding j1Var4 = this.f18571b0;
            if (j1Var4 != null) {
                bVar.m11476a(j1Var4.f21761y);
                ActivityRenewalLiveBinding j1Var5 = this.f18571b0;
                if (j1Var5 != null) {
                    j1Var5.mo3790Q(i);
                    String str2 = (sketchPhotoMap == null || (sketchPhoto = sketchPhotoMap.sq60) == null) ? null : sketchPhoto.url;
                    ActivityRenewalLiveBinding j1Var6 = this.f18571b0;
                    if (j1Var6 != null) {
                        j1Var6.mo3789W(str2);
                        if (str2 == null || (!URLUtil.isHttpsUrl(str2) && !URLUtil.isHttpUrl(str2))) {
                            ActivityRenewalLiveBinding j1Var7 = this.f18571b0;
                            if (j1Var7 != null) {
                                j1Var7.f21730Q.setImageDrawable(null);
                                ActivityRenewalLiveBinding j1Var8 = this.f18571b0;
                                if (j1Var8 != null) {
                                    j1Var8.f21734a0.setImageDrawable(null);
                                } else {
                                    MutabilityOwnership.m3737u("binding");
                                    throw null;
                                }
                            } else {
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                        } else {
                            ActivityRenewalLiveBinding j1Var9 = this.f18571b0;
                            if (j1Var9 != null) {
                                ImageView imageView = j1Var9.f21730Q;
                                MutabilityOwnership.m3746l(imageView, "binding.selectedVideoIcon");
                                PixivImageLoader j1 = m4751j1();
                                Context context = imageView.getContext();
                                MutabilityOwnership.m3746l(context, "selectedVideoIcon.context");
                                ActivityRenewalLiveBinding j1Var10 = this.f18571b0;
                                if (j1Var10 != null) {
                                    j1.m60f(context, j1Var10.f21741h0, imageView);
                                    ActivityRenewalLiveBinding j1Var11 = this.f18571b0;
                                    if (j1Var11 != null) {
                                        ImageView imageView2 = j1Var11.f21734a0;
                                        MutabilityOwnership.m3746l(imageView2, "binding.userIconImageView");
                                        PixivImageLoader j12 = m4751j1();
                                        Context context2 = imageView2.getContext();
                                        MutabilityOwnership.m3746l(context2, "userIconImageView.context");
                                        ActivityRenewalLiveBinding j1Var12 = this.f18571b0;
                                        if (j1Var12 != null) {
                                            j12.m60f(context2, j1Var12.f21741h0, imageView2);
                                        } else {
                                            MutabilityOwnership.m3737u("binding");
                                            throw null;
                                        }
                                    } else {
                                        MutabilityOwnership.m3737u("binding");
                                        throw null;
                                    }
                                } else {
                                    MutabilityOwnership.m3737u("binding");
                                    throw null;
                                }
                            } else {
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                        }
                        ActivityRenewalLiveBinding j1Var13 = this.f18571b0;
                        if (j1Var13 != null) {
                            j1Var13.f21734a0.setOnClickListener(new View$OnClickListenerC0159t4(l, this, 1));
                            ActivityRenewalLiveBinding j1Var14 = this.f18571b0;
                            if (j1Var14 != null) {
                                j1Var14.mo3788Y(str);
                                ActivityRenewalLiveBinding j1Var15 = this.f18571b0;
                                if (j1Var15 != null) {
                                    j1Var15.f21735b0.setOnClickListener(new View$OnClickListenerC0090h7(l, this, 0));
                                } else {
                                    MutabilityOwnership.m3737u("binding");
                                    throw null;
                                }
                            } else {
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                        } else {
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                    } else {
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    /* renamed from: l1 */
    public final void m4749l1() {
        View decorView = getWindow().getDecorView();
        MutabilityOwnership.m3746l(decorView, "window.decorView");
        decorView.setSystemUiVisibility(5894);
        getWindow().addFlags(1536);
    }

    /* renamed from: m1 */
    public final void m4748m1(long j) {
        EdgeTreatment.m3910h(j > 0);
        Intent intent = new Intent(this, UserProfileActivity.class);
        intent.putExtra("USER_ID", j);
        startActivity(intent);
    }

    @Override // p397oj.LiveInfoStateRenderer
    /* renamed from: n */
    public void mo3238n(long j) {
        NumberFormat numberInstance = NumberFormat.getNumberInstance(Locale.US);
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.f21722I.setText(numberInstance.format(j));
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    /* renamed from: n1 */
    public final void m4747n1(RenewalLiveView renewalLiveView, LiveVideosState.C5376a aVar, boolean z, boolean z2, boolean z3) {
        SketchPhoto sketchPhoto;
        String str;
        boolean z4 = true;
        boolean z5 = !z2 && z;
        if (!z3 && !z5 && !aVar.f23979h && aVar.f23976e != null && !aVar.f23978g) {
            z4 = false;
        }
        if (z4) {
            SketchPhotoMap sketchPhotoMap = aVar.f23977f;
            if (!(sketchPhotoMap == null || (sketchPhoto = sketchPhotoMap.w160) == null || (str = sketchPhoto.url) == null)) {
                renewalLiveView.setThumbnailImageURL(str);
            }
            LiveHlsMediaPlayer liveHlsMediaPlayer = renewalLiveView.f19660a;
            if (liveHlsMediaPlayer != null) {
                liveHlsMediaPlayer.stop();
            }
            renewalLiveView.f19668i = false;
            return;
        }
        renewalLiveView.setThumbnailImageURL(null);
        String str2 = aVar.f23976e;
        MutabilityOwnership.m3747j(str2);
        renewalLiveView.m4472a(str2);
    }

    @Override // p397oj.LiveVideosStateRenderer
    /* renamed from: o0 */
    public void mo3225o0(int i) {
        RenewalLiveView remove = this.f18589t0.remove(i);
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.f21761y.removeView(remove);
            m4744q1();
            return;
        }
        MutabilityOwnership.m3737u("binding");
        throw null;
    }

    /* renamed from: o1 */
    public final void m4746o1(RenewalLiveView renewalLiveView, LiveVideosState.C5376a aVar, boolean z, boolean z2, boolean z3) {
        renewalLiveView.setLoading(aVar.f23979h);
        int i = 8;
        if (z2) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                j1Var.mo3796H(aVar.f23980i);
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    j1Var2.f21728O.setOnClickListener(new View$OnClickListenerC0050b(renewalLiveView, 8));
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        } else if (z) {
            renewalLiveView.setNeedRefresh(false);
        } else {
            renewalLiveView.setNeedRefresh(aVar.f23980i);
        }
        renewalLiveView.setMuted(aVar.f23978g);
        if (z3) {
            i = 0;
        }
        renewalLiveView.setVisibility(i);
        renewalLiveView.setRefreshListener(new C4101r(aVar, this));
        renewalLiveView.setOnLoadError(new C4102s(aVar));
        renewalLiveView.setOnLongClickListener(new View.OnLongClickListener(z2, aVar, this) { // from class: ae.l7

            /* renamed from: a */
            public final /* synthetic */ boolean f468a;

            /* renamed from: b */
            public final /* synthetic */ LiveVideosState.C5376a f469b;

            /* renamed from: c */
            public final /* synthetic */ RenewalLiveActivity f470c;

            {
                this.f468a = r1;
                this.f469b = r2;
                this.f470c = r3;
            }

            @Override // android.view.View.OnLongClickListener
            public final boolean onLongClick(View view) {
                boolean z4 = this.f468a;
                LiveVideosState.C5376a aVar2 = this.f469b;
                RenewalLiveActivity renewalLiveActivity = this.f470c;
                int i2 = RenewalLiveActivity.f18570y0;
                MutabilityOwnership.m3745m(aVar2, "$videoState");
                MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                if (z4 || aVar2.f23973b == PixivAccountManager.m5511e().f16499e) {
                    return false;
                }
                AlertDialog.C0305a aVar3 = new AlertDialog.C0305a(renewalLiveActivity);
                String[] strArr = {renewalLiveActivity.getString(R.string.mute_settings)};
                DialogInterface$OnClickListenerC0079g gVar = new DialogInterface$OnClickListenerC0079g(renewalLiveActivity, aVar2, 1);
                AlertController.C0299b bVar = aVar3.f1085a;
                bVar.f1066p = strArr;
                bVar.f1068r = gVar;
                aVar3.m12013a().show();
                return true;
            }
        });
    }

    @Override // p270jp.pxv.android.activity.AbstractActivityC4151b, androidx.activity.ComponentActivity, android.app.Activity
    public void onBackPressed() {
        if (getRequestedOrientation() == 0) {
            m4754g1().f23822c.mo2437b(LiveAction.C5298g.f23781a);
        } else {
            super.onBackPressed();
        }
    }

    @Override // p270jp.pxv.android.activity.AbstractActivityC4151b, p270jp.pxv.android.activity.BaseActivity, androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, p248j2.ActivityC3902g, android.app.Activity
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        ViewDataBinding d = DataBindingUtil.m11369d(this, R.layout.activity_renewal_live);
        MutabilityOwnership.m3746l(d, "setContentView(this, R.l…ut.activity_renewal_live)");
        this.f18571b0 = (ActivityRenewalLiveBinding) d;
        setRequestedOrientation(1);
        String stringExtra = getIntent().getStringExtra("LIVE_ID");
        if (stringExtra != null) {
            this.f18572c0 = stringExtra;
            View[] viewArr = new View[4];
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                View view = j1Var.f21736c0;
                MutabilityOwnership.m3746l(view, "binding.videoContainer1");
                viewArr[0] = view;
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    View view2 = j1Var2.f21737d0;
                    MutabilityOwnership.m3746l(view2, "binding.videoContainer2");
                    viewArr[1] = view2;
                    ActivityRenewalLiveBinding j1Var3 = this.f18571b0;
                    if (j1Var3 != null) {
                        View view3 = j1Var3.f21738e0;
                        MutabilityOwnership.m3746l(view3, "binding.videoContainer3");
                        viewArr[2] = view3;
                        ActivityRenewalLiveBinding j1Var4 = this.f18571b0;
                        if (j1Var4 != null) {
                            View view4 = j1Var4.f21739f0;
                            MutabilityOwnership.m3746l(view4, "binding.videoContainer4");
                            viewArr[3] = view4;
                            this.f18590u0 = Chain.m9925y(viewArr);
                            ActivityRenewalLiveBinding j1Var5 = this.f18571b0;
                            if (j1Var5 != null) {
                                j1Var5.f21740g0.post(new RunnableC0624k(this, 6));
                                ActivityRenewalLiveBinding j1Var6 = this.f18571b0;
                                if (j1Var6 != null) {
                                    j1Var6.f21760x.setOnClickListener(new View$OnClickListenerC0181w7(this, 0));
                                    ActivityRenewalLiveBinding j1Var7 = this.f18571b0;
                                    if (j1Var7 != null) {
                                        j1Var7.f21724K.setOnClickListener(new View$OnClickListenerC0161t7(this, 0));
                                        ActivityRenewalLiveBinding j1Var8 = this.f18571b0;
                                        if (j1Var8 != null) {
                                            j1Var8.f21715B.setOnClickListener(new View$OnClickListenerC0169u7(this, 0));
                                            ActivityRenewalLiveBinding j1Var9 = this.f18571b0;
                                            if (j1Var9 != null) {
                                                j1Var9.f21716C.setOnClickListener(new View$OnClickListenerC0173v7(this, 0));
                                                DividerItemDecoration oVar = new DividerItemDecoration(this, 1);
                                                Object obj = ContextCompat.f19963a;
                                                Drawable b = ContextCompat.C4472c.m4259b(this, R.drawable.divider_live_chat);
                                                MutabilityOwnership.m3747j(b);
                                                oVar.f3871a = b;
                                                ActivityRenewalLiveBinding j1Var10 = this.f18571b0;
                                                if (j1Var10 != null) {
                                                    j1Var10.f21759w.m10871g(oVar);
                                                    ActivityRenewalLiveBinding j1Var11 = this.f18571b0;
                                                    if (j1Var11 != null) {
                                                        j1Var11.f21759w.setAdapter(this.f18593x0);
                                                        ActivityRenewalLiveBinding j1Var12 = this.f18571b0;
                                                        if (j1Var12 != null) {
                                                            ClickableRecyclerView clickableRecyclerView = j1Var12.f21759w;
                                                            SlideInUpAnimator eVar = new SlideInUpAnimator(new DecelerateInterpolator(0.5f));
                                                            eVar.f3611c = 30;
                                                            clickableRecyclerView.setItemAnimator(eVar);
                                                            ActivityRenewalLiveBinding j1Var13 = this.f18571b0;
                                                            if (j1Var13 != null) {
                                                                ClickableRecyclerView clickableRecyclerView2 = j1Var13.f21759w;
                                                                clickableRecyclerView2.f3561q.add(new C4096o(this));
                                                                ViewTreeObserver$OnGlobalLayoutListenerC4100q qVar = new ViewTreeObserver$OnGlobalLayoutListenerC4100q();
                                                                ActivityRenewalLiveBinding j1Var14 = this.f18571b0;
                                                                if (j1Var14 != null) {
                                                                    j1Var14.f21759w.getViewTreeObserver().addOnGlobalLayoutListener(qVar);
                                                                    ActivityRenewalLiveBinding j1Var15 = this.f18571b0;
                                                                    if (j1Var15 != null) {
                                                                        j1Var15.f21758v.setOnClickListener(new View$OnClickListenerC0163u(this, 5));
                                                                        ActivityRenewalLiveBinding j1Var16 = this.f18571b0;
                                                                        if (j1Var16 != null) {
                                                                            j1Var16.f21757u.addTextChangedListener(new C4099p());
                                                                            ActivityRenewalLiveBinding j1Var17 = this.f18571b0;
                                                                            if (j1Var17 != null) {
                                                                                j1Var17.f21757u.setOnFocusChangeListener(new View.OnFocusChangeListener() { // from class: ae.k7
                                                                                    @Override // android.view.View.OnFocusChangeListener
                                                                                    public final void onFocusChange(View view5, boolean z) {
                                                                                        RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
                                                                                        int i = RenewalLiveActivity.f18570y0;
                                                                                        MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                                                                                        if (!z) {
                                                                                            renewalLiveActivity.m4754g1().m3359d();
                                                                                        }
                                                                                    }
                                                                                });
                                                                                ActivityRenewalLiveBinding j1Var18 = this.f18571b0;
                                                                                if (j1Var18 != null) {
                                                                                    j1Var18.f21718E.setOnClickListener(new View$OnClickListenerC0181w7(this, 1));
                                                                                    progressionUtil.m9685e(this, null, null, new C4077a(this), Reflection.m5499a(LiveGiftStore.class), null);
                                                                                    progressionUtil.m9685e(this, null, null, new C4079b(this), Reflection.m5499a(LivePointStore.class), null);
                                                                                    Disposable g = subscribers.m2589g(m4752i1().f23952e.m986o(AndroidSchedulers.m334a()), C4081c.f18599a, null, new C4083d(), 2);
                                                                                    CompositeDisposable aVar = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar, "compositeDisposable");
                                                                                    aVar.mo82c(g);
                                                                                    Disposable g2 = subscribers.m2589g(m4752i1().f23954g.m986o(AndroidSchedulers.m334a()), null, null, new C4085e(), 3);
                                                                                    CompositeDisposable aVar2 = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar2, "compositeDisposable");
                                                                                    aVar2.mo82c(g2);
                                                                                    m4752i1().f23956i.mo2789b(this, new C0126n7(this, 0));
                                                                                    m4752i1().f23958k.mo2789b(this, new C0123m7(this, 0));
                                                                                    Disposable g3 = subscribers.m2589g(((LiveVideosStore) this.f18578i0.getValue()).f23983e.m986o(AndroidSchedulers.m334a()), C4087f.f18606a, null, new C4088g(), 2);
                                                                                    CompositeDisposable aVar3 = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar3, "compositeDisposable");
                                                                                    aVar3.mo82c(g3);
                                                                                    Disposable g4 = subscribers.m2589g(m4753h1().f23897e.m986o(AndroidSchedulers.m334a()), C4089h.f18608a, null, new C4090i(), 2);
                                                                                    CompositeDisposable aVar4 = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar4, "compositeDisposable");
                                                                                    aVar4.mo82c(g4);
                                                                                    Disposable g5 = subscribers.m2589g(m4753h1().f23899g.m986o(AndroidSchedulers.m334a()), null, null, new C4091j(), 3);
                                                                                    CompositeDisposable aVar5 = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar5, "compositeDisposable");
                                                                                    aVar5.mo82c(g5);
                                                                                    Flowable<SketchLiveGiftingItem> d2 = m4753h1().f23901i.m1005d();
                                                                                    AbstractC6904o a = AndroidSchedulers.m334a();
                                                                                    int i = Flowable.f29377a;
                                                                                    ObjectHelper.m9746a(i, "bufferSize");
                                                                                    new FlowableObserveOn(d2, a, false, i).m1004e(new C4092k());
                                                                                    Disposable g6 = subscribers.m2589g(m4753h1().f23903k.m986o(AndroidSchedulers.m334a()), null, null, new C4093l(), 3);
                                                                                    CompositeDisposable aVar6 = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar6, "compositeDisposable");
                                                                                    aVar6.mo82c(g6);
                                                                                    ((LiveErrorStore) this.f18580k0.getValue()).f23916e.mo2789b(this, new C6611y6(this, 2));
                                                                                    Disposable g7 = subscribers.m2589g(((LiveErrorStore) this.f18580k0.getValue()).f23918g, null, null, new C4094m(), 3);
                                                                                    CompositeDisposable aVar7 = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar7, "compositeDisposable");
                                                                                    aVar7.mo82c(g7);
                                                                                    m4754g1().f23822c.mo2437b(new FirebaseAnalyticsAction(new ScreenView(AnalyticsScreenName.LIVE_DETAIL, null, null, 6)));
                                                                                    m4754g1().f23822c.mo2437b(new LiveAction.C5313n0(LiveActionCreator.f23821r.contains(Build.MODEL)));
                                                                                    m4754g1().f23822c.mo2437b(new LiveAction.C5324u(PixivAccountManager.m5511e().f16499e));
                                                                                    m4755f1();
                                                                                    Disposable g8 = subscribers.m2589g(AbstractC6902j.m988m(1, 16, TimeUnit.SECONDS).m986o(AndroidSchedulers.m334a()), null, null, new C4095n(), 3);
                                                                                    CompositeDisposable aVar8 = this.f18573d0;
                                                                                    MutabilityOwnership.m3744n(aVar8, "compositeDisposable");
                                                                                    aVar8.mo82c(g8);
                                                                                    m12145X0(GoogleNg.R18);
                                                                                    return;
                                                                                }
                                                                                MutabilityOwnership.m3737u("binding");
                                                                                throw null;
                                                                            }
                                                                            MutabilityOwnership.m3737u("binding");
                                                                            throw null;
                                                                        }
                                                                        MutabilityOwnership.m3737u("binding");
                                                                        throw null;
                                                                    }
                                                                    MutabilityOwnership.m3737u("binding");
                                                                    throw null;
                                                                }
                                                                MutabilityOwnership.m3737u("binding");
                                                                throw null;
                                                            }
                                                            MutabilityOwnership.m3737u("binding");
                                                            throw null;
                                                        }
                                                        MutabilityOwnership.m3737u("binding");
                                                        throw null;
                                                    }
                                                    MutabilityOwnership.m3737u("binding");
                                                    throw null;
                                                }
                                                MutabilityOwnership.m3737u("binding");
                                                throw null;
                                            }
                                            MutabilityOwnership.m3737u("binding");
                                            throw null;
                                        }
                                        MutabilityOwnership.m3737u("binding");
                                        throw null;
                                    }
                                    MutabilityOwnership.m3737u("binding");
                                    throw null;
                                }
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
        throw new IllegalArgumentException("Required value was null.".toString());
    }

    @Override // p014ae.AdActivity, p270jp.pxv.android.activity.BaseActivity, p116e.ActivityC2727f, androidx.fragment.app.FragmentActivity, android.app.Activity
    public void onDestroy() {
        super.onDestroy();
        this.f18573d0.m80f();
    }

    @Subscribe
    public final void onEvent(UpdateMuteEvent updateMuteEvent) {
        MutabilityOwnership.m3745m(updateMuteEvent, "event");
        LiveActionCreator g1 = m4754g1();
        g1.f23828i.mo82c(PixivRequest.m5814c().m961o(C6034a.f26178c).m963m(new C0135p4(g1, 10), C0199z4.f697f));
    }

    @Override // p270jp.pxv.android.activity.AbstractActivityC4151b, p014ae.AdActivity, p270jp.pxv.android.activity.BaseActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
    public void onPause() {
        super.onPause();
        m4754g1().f23822c.mo2437b(LiveAction.C5320r.f23810a);
        m4750k1().f4983d.m80f();
        this.f18575f0.m80f();
        this.f18592w0.mo78a();
    }

    @Override // p270jp.pxv.android.activity.AbstractActivityC4151b, p014ae.AdActivity, p270jp.pxv.android.activity.BaseActivity, androidx.fragment.app.FragmentActivity, android.app.Activity
    public void onResume() {
        super.onResume();
        m4754g1().f23822c.mo2437b(LiveAction.C5323t.f23814a);
        C1122c k1 = m4750k1();
        String str = this.f18572c0;
        if (str != null) {
            CompositeDisposable aVar = k1.f4983d;
            ObservableRetryWhen xVar = new ObservableRetryWhen(new ObservableCreate(new C7297m(k1, str, 2)).m982s(C6034a.f26178c), C7467v.f31272f);
            C6830b bVar = new C6830b(k1, 9);
            C0100j9 j9Var = C0100j9.f420c;
            Action aVar2 = Functions.f5386c;
            Consumer<? super Disposable> eVar = Functions.f5387d;
            aVar.mo82c(xVar.m984q(bVar, j9Var, aVar2, eVar));
            AbstractC6902j<AudienceCountUpdatedMessage> jVar = m4750k1().f4985f;
            C0137p7 p7Var = new Consumer(this, 0) { // from class: ae.p7

                /* renamed from: a */
                public final /* synthetic */ int f529a;

                /* renamed from: b */
                public final /* synthetic */ RenewalLiveActivity f530b;

                {
                    this.f529a = r2;
                    this.f530b = r1;
                }

                @Override // p013ad.Consumer
                /* renamed from: d */
                public final void mo1150d(Object obj) {
                    switch (this.f529a) {
                        case 0:
                            RenewalLiveActivity renewalLiveActivity = this.f530b;
                            AudienceCountUpdatedMessage audienceCountUpdatedMessage = (AudienceCountUpdatedMessage) obj;
                            int i = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                            renewalLiveActivity.m4754g1().f23822c.mo2437b(new LiveAction.C5309l0(audienceCountUpdatedMessage.count, audienceCountUpdatedMessage.total));
                            return;
                        default:
                            RenewalLiveActivity renewalLiveActivity2 = this.f530b;
                            StreamMessage streamMessage = (StreamMessage) obj;
                            int i2 = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity2, "this$0");
                            String str2 = streamMessage.hlsMovie.url;
                            if (str2 != null) {
                                renewalLiveActivity2.m4754g1().m3353j(streamMessage.userId, str2);
                                return;
                            }
                            return;
                    }
                }
            };
            Consumer<Throwable> eVar2 = Functions.f5388e;
            Disposable q = jVar.m984q(p7Var, eVar2, aVar2, eVar);
            CompositeDisposable aVar3 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar3, "compositeDisposable");
            aVar3.mo82c(q);
            Disposable q2 = m4750k1().f4987h.m984q(new Consumer(this, 0) { // from class: ae.o7

                /* renamed from: a */
                public final /* synthetic */ int f517a;

                /* renamed from: b */
                public final /* synthetic */ RenewalLiveActivity f518b;

                {
                    this.f517a = r2;
                    this.f518b = r1;
                }

                @Override // p013ad.Consumer
                /* renamed from: d */
                public final void mo1150d(Object obj) {
                    switch (this.f517a) {
                        case 0:
                            RenewalLiveActivity renewalLiveActivity = this.f518b;
                            int i = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                            LiveActionCreator g1 = renewalLiveActivity.m4754g1();
                            SketchLiveChat sketchLiveChat = ((ChatMessage) obj).chat;
                            MutabilityOwnership.m3746l(sketchLiveChat, "message.chat");
                            Objects.requireNonNull(g1);
                            g1.f23832m.mo305g(sketchLiveChat);
                            return;
                        default:
                            RenewalLiveActivity renewalLiveActivity2 = this.f518b;
                            FinishMessage finishMessage = (FinishMessage) obj;
                            int i2 = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity2, "this$0");
                            renewalLiveActivity2.m4754g1().f23822c.mo2437b(LiveAction.C5310m.f23800a);
                            return;
                    }
                }
            }, eVar2, aVar2, eVar);
            CompositeDisposable aVar4 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar4, "compositeDisposable");
            aVar4.mo82c(q2);
            Disposable q3 = m4750k1().f4989j.m984q(new C0185y(this, 5), eVar2, aVar2, eVar);
            CompositeDisposable aVar5 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar5, "compositeDisposable");
            aVar5.mo82c(q3);
            Disposable q4 = m4750k1().f4999t.m984q(new C0135p4(this, 6), eVar2, aVar2, eVar);
            CompositeDisposable aVar6 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar6, "compositeDisposable");
            aVar6.mo82c(q4);
            Disposable q5 = m4750k1().f4991l.m984q(new C6830b(this, 4), eVar2, aVar2, eVar);
            CompositeDisposable aVar7 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar7, "compositeDisposable");
            aVar7.mo82c(q5);
            Disposable q6 = m4750k1().f4993n.m984q(new Consumer(this, 1) { // from class: ae.g7

                /* renamed from: a */
                public final /* synthetic */ int f377a;

                /* renamed from: b */
                public final /* synthetic */ RenewalLiveActivity f378b;

                {
                    this.f377a = r2;
                    this.f378b = r1;
                }

                @Override // p013ad.Consumer
                /* renamed from: d */
                public final void mo1150d(Object obj) {
                    switch (this.f377a) {
                        case 0:
                            RenewalLiveActivity renewalLiveActivity = this.f378b;
                            Long l = (Long) obj;
                            int i = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                            renewalLiveActivity.m4754g1().f23822c.mo2437b(LiveAction.C5315o0.f23805a);
                            return;
                        default:
                            RenewalLiveActivity renewalLiveActivity2 = this.f378b;
                            int i2 = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity2, "this$0");
                            LiveActionCreator g1 = renewalLiveActivity2.m4754g1();
                            SketchUser sketchUser = ((LeaveMessage) obj).roomMember.user;
                            MutabilityOwnership.m3746l(sketchUser, "message.roomMember.user");
                            Objects.requireNonNull(g1);
                            g1.f23822c.mo2437b(new LiveAction.C5314o(sketchUser));
                            return;
                    }
                }
            }, eVar2, aVar2, eVar);
            CompositeDisposable aVar8 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar8, "compositeDisposable");
            aVar8.mo82c(q6);
            Disposable q7 = m4750k1().f4995p.m984q(new Consumer(this, 1) { // from class: ae.p7

                /* renamed from: a */
                public final /* synthetic */ int f529a;

                /* renamed from: b */
                public final /* synthetic */ RenewalLiveActivity f530b;

                {
                    this.f529a = r2;
                    this.f530b = r1;
                }

                @Override // p013ad.Consumer
                /* renamed from: d */
                public final void mo1150d(Object obj) {
                    switch (this.f529a) {
                        case 0:
                            RenewalLiveActivity renewalLiveActivity = this.f530b;
                            AudienceCountUpdatedMessage audienceCountUpdatedMessage = (AudienceCountUpdatedMessage) obj;
                            int i = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                            renewalLiveActivity.m4754g1().f23822c.mo2437b(new LiveAction.C5309l0(audienceCountUpdatedMessage.count, audienceCountUpdatedMessage.total));
                            return;
                        default:
                            RenewalLiveActivity renewalLiveActivity2 = this.f530b;
                            StreamMessage streamMessage = (StreamMessage) obj;
                            int i2 = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity2, "this$0");
                            String str2 = streamMessage.hlsMovie.url;
                            if (str2 != null) {
                                renewalLiveActivity2.m4754g1().m3353j(streamMessage.userId, str2);
                                return;
                            }
                            return;
                    }
                }
            }, eVar2, aVar2, eVar);
            CompositeDisposable aVar9 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar9, "compositeDisposable");
            aVar9.mo82c(q7);
            Disposable q8 = m4750k1().f4997r.m984q(new Consumer(this, 1) { // from class: ae.o7

                /* renamed from: a */
                public final /* synthetic */ int f517a;

                /* renamed from: b */
                public final /* synthetic */ RenewalLiveActivity f518b;

                {
                    this.f517a = r2;
                    this.f518b = r1;
                }

                @Override // p013ad.Consumer
                /* renamed from: d */
                public final void mo1150d(Object obj) {
                    switch (this.f517a) {
                        case 0:
                            RenewalLiveActivity renewalLiveActivity = this.f518b;
                            int i = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                            LiveActionCreator g1 = renewalLiveActivity.m4754g1();
                            SketchLiveChat sketchLiveChat = ((ChatMessage) obj).chat;
                            MutabilityOwnership.m3746l(sketchLiveChat, "message.chat");
                            Objects.requireNonNull(g1);
                            g1.f23832m.mo305g(sketchLiveChat);
                            return;
                        default:
                            RenewalLiveActivity renewalLiveActivity2 = this.f518b;
                            FinishMessage finishMessage = (FinishMessage) obj;
                            int i2 = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity2, "this$0");
                            renewalLiveActivity2.m4754g1().f23822c.mo2437b(LiveAction.C5310m.f23800a);
                            return;
                    }
                }
            }, eVar2, aVar2, eVar);
            CompositeDisposable aVar10 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar10, "compositeDisposable");
            aVar10.mo82c(q8);
            AbstractC6902j<GiftingMessage> jVar2 = m4750k1().f5001v;
            MutabilityOwnership.m3746l(jVar2, "webSocketClient.giftingMessage");
            Disposable g = subscribers.m2589g(jVar2, null, null, new C0073e8(this), 3);
            CompositeDisposable aVar11 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar11, "compositeDisposable");
            aVar11.mo82c(g);
            AbstractC6902j<PerformerThumbnailMessage> jVar3 = m4750k1().f5003x;
            MutabilityOwnership.m3746l(jVar3, "webSocketClient.performerThumbnailMessage");
            Disposable g2 = subscribers.m2589g(jVar3, null, null, new C0065d8(this), 3);
            CompositeDisposable aVar12 = this.f18575f0;
            MutabilityOwnership.m3744n(aVar12, "compositeDisposable");
            aVar12.mo82c(g2);
            this.f18592w0 = AbstractC6902j.m987n(1, 1, TimeUnit.MINUTES, C6034a.f26177b).m984q(new Consumer(this, 0) { // from class: ae.g7

                /* renamed from: a */
                public final /* synthetic */ int f377a;

                /* renamed from: b */
                public final /* synthetic */ RenewalLiveActivity f378b;

                {
                    this.f377a = r2;
                    this.f378b = r1;
                }

                @Override // p013ad.Consumer
                /* renamed from: d */
                public final void mo1150d(Object obj) {
                    switch (this.f377a) {
                        case 0:
                            RenewalLiveActivity renewalLiveActivity = this.f378b;
                            Long l = (Long) obj;
                            int i = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                            renewalLiveActivity.m4754g1().f23822c.mo2437b(LiveAction.C5315o0.f23805a);
                            return;
                        default:
                            RenewalLiveActivity renewalLiveActivity2 = this.f378b;
                            int i2 = RenewalLiveActivity.f18570y0;
                            MutabilityOwnership.m3745m(renewalLiveActivity2, "this$0");
                            LiveActionCreator g1 = renewalLiveActivity2.m4754g1();
                            SketchUser sketchUser = ((LeaveMessage) obj).roomMember.user;
                            MutabilityOwnership.m3746l(sketchUser, "message.roomMember.user");
                            Objects.requireNonNull(g1);
                            g1.f23822c.mo2437b(new LiveAction.C5314o(sketchUser));
                            return;
                    }
                }
            }, eVar2, aVar2, eVar);
            return;
        }
        MutabilityOwnership.m3737u("liveId");
        throw null;
    }

    @Override // android.app.Activity, android.view.Window.Callback
    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        if (z) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var == null) {
                MutabilityOwnership.m3737u("binding");
                throw null;
            } else if (j1Var.f21748o0) {
                m4749l1();
            }
        }
    }

    @Override // p397oj.LiveVideosStateRenderer
    /* renamed from: p */
    public void mo3224p(LiveVideosState.C5376a aVar, int i, int i2, boolean z, boolean z2) {
        MutabilityOwnership.m3745m(aVar, "videoState");
        RenewalLiveView renewalLiveView = new RenewalLiveView(this, null, 0, 6);
        renewalLiveView.setId(View.generateViewId());
        renewalLiveView.setCornerRadius((float) getResources().getDimensionPixelSize(R.dimen.live_sub_video_radius));
        this.f18589t0.add(i, renewalLiveView);
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            ConstraintLayout constraintLayout = j1Var.f21761y;
            if (j1Var != null) {
                int indexOfChild = constraintLayout.indexOfChild(j1Var.f21739f0);
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    j1Var2.f21761y.addView(renewalLiveView, indexOfChild + 1);
                    m4744q1();
                    return;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
        MutabilityOwnership.m3737u("binding");
        throw null;
    }

    /* renamed from: p1 */
    public final void m4745p1() {
        LiveActionCreator g1 = m4754g1();
        String str = this.f18572c0;
        if (str != null) {
            ActivityRenewalLiveBinding j1Var = this.f18571b0;
            if (j1Var != null) {
                String valueOf = String.valueOf(j1Var.f21757u.getText());
                Objects.requireNonNull(g1);
                if (g1.f23829j.mo77e()) {
                    g1.f23827h.m6527c(18, AnalyticsAction.SKETCH_LIVE_SEND_CHAT, str);
                    PixivSketchRequest yVar = g1.f23823d;
                    Single<String> c = yVar.f15736a.m5513c();
                    C7457l lVar = new C7457l(yVar, str, valueOf, 2);
                    Objects.requireNonNull(c);
                    Disposable e = subscribers.m2591e(new SingleFlatMap(c, lVar), new C5355h(g1), new C5356i(g1));
                    CompositeDisposable aVar = g1.f23828i;
                    MutabilityOwnership.m3744n(aVar, "compositeDisposable");
                    aVar.mo82c(e);
                    g1.f23829j = e;
                    return;
                }
                return;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
        MutabilityOwnership.m3737u("liveId");
        throw null;
    }

    /* renamed from: q1 */
    public final void m4744q1() {
        List<? extends View> list = this.f18590u0;
        if (list != null) {
            int i = 0;
            for (Object obj : list) {
                int i2 = i + 1;
                if (i >= 0) {
                    View view = (View) obj;
                    if (i < this.f18589t0.size()) {
                        RenewalLiveView renewalLiveView = this.f18589t0.get(i);
                        renewalLiveView.setLayoutParams(view.getLayoutParams());
                        renewalLiveView.setOnClickListener(new View.OnClickListener(i) { // from class: ae.i7

                            /* renamed from: b */
                            public final /* synthetic */ int f406b;

                            {
                                this.f406b = r2;
                            }

                            @Override // android.view.View.OnClickListener
                            public final void onClick(View view2) {
                                RenewalLiveActivity renewalLiveActivity = RenewalLiveActivity.this;
                                int i3 = this.f406b;
                                int i4 = RenewalLiveActivity.f18570y0;
                                MutabilityOwnership.m3745m(renewalLiveActivity, "this$0");
                                renewalLiveActivity.m4754g1().f23822c.mo2437b(new LiveAction.C5326w(i3));
                            }
                        });
                    }
                    i = i2;
                } else {
                    Chain.m9952H();
                    throw null;
                }
            }
            return;
        }
        MutabilityOwnership.m3737u("videoContainers");
        throw null;
    }

    @Override // p397oj.LiveVideosStateRenderer
    /* renamed from: w */
    public void mo3223w(boolean z) {
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3798E(z);
            if (z) {
                setRequestedOrientation(0);
                m4749l1();
                ConstraintSet bVar = new ConstraintSet();
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    bVar.m11474c(j1Var2.f21740g0);
                    ActivityRenewalLiveBinding j1Var3 = this.f18571b0;
                    if (j1Var3 != null) {
                        bVar.f2414c.remove(Integer.valueOf(j1Var3.f21727N.getId()));
                        ActivityRenewalLiveBinding j1Var4 = this.f18571b0;
                        if (j1Var4 != null) {
                            bVar.m11470g(j1Var4.f21727N.getId()).f2418d.f2502z = "16:9";
                            ActivityRenewalLiveBinding j1Var5 = this.f18571b0;
                            if (j1Var5 != null) {
                                bVar.m11470g(j1Var5.f21727N.getId()).f2418d.f2465c = 0;
                                ActivityRenewalLiveBinding j1Var6 = this.f18571b0;
                                if (j1Var6 != null) {
                                    bVar.m11470g(j1Var6.f21727N.getId()).f2418d.f2467d = -2;
                                    ActivityRenewalLiveBinding j1Var7 = this.f18571b0;
                                    if (j1Var7 != null) {
                                        int id = j1Var7.f21727N.getId();
                                        ActivityRenewalLiveBinding j1Var8 = this.f18571b0;
                                        if (j1Var8 != null) {
                                            bVar.m11473d(id, 6, j1Var8.f21740g0.getId(), 6);
                                            ActivityRenewalLiveBinding j1Var9 = this.f18571b0;
                                            if (j1Var9 != null) {
                                                int id2 = j1Var9.f21727N.getId();
                                                ActivityRenewalLiveBinding j1Var10 = this.f18571b0;
                                                if (j1Var10 != null) {
                                                    bVar.m11473d(id2, 7, j1Var10.f21740g0.getId(), 7);
                                                    ActivityRenewalLiveBinding j1Var11 = this.f18571b0;
                                                    if (j1Var11 != null) {
                                                        bVar.m11476a(j1Var11.f21740g0);
                                                        ActivityRenewalLiveBinding j1Var12 = this.f18571b0;
                                                        if (j1Var12 != null) {
                                                            j1Var12.f21740g0.m4456s();
                                                            ActivityRenewalLiveBinding j1Var13 = this.f18571b0;
                                                            if (j1Var13 != null) {
                                                                ZoomView zoomView = j1Var13.f21740g0;
                                                                MutabilityOwnership.m3746l(zoomView, "binding.zoomView");
                                                                ZoomView.m4452w(zoomView, 1.0f, 0.0f, 0.0f, 6);
                                                                return;
                                                            }
                                                            MutabilityOwnership.m3737u("binding");
                                                            throw null;
                                                        }
                                                        MutabilityOwnership.m3737u("binding");
                                                        throw null;
                                                    }
                                                    MutabilityOwnership.m3737u("binding");
                                                    throw null;
                                                }
                                                MutabilityOwnership.m3737u("binding");
                                                throw null;
                                            }
                                            MutabilityOwnership.m3737u("binding");
                                            throw null;
                                        }
                                        MutabilityOwnership.m3737u("binding");
                                        throw null;
                                    }
                                    MutabilityOwnership.m3737u("binding");
                                    throw null;
                                }
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            setRequestedOrientation(1);
            View decorView = getWindow().getDecorView();
            MutabilityOwnership.m3746l(decorView, "window.decorView");
            decorView.setSystemUiVisibility(0);
            getWindow().clearFlags(1536);
            ConstraintSet bVar2 = new ConstraintSet();
            ActivityRenewalLiveBinding j1Var14 = this.f18571b0;
            if (j1Var14 != null) {
                bVar2.m11474c(j1Var14.f21740g0);
                ActivityRenewalLiveBinding j1Var15 = this.f18571b0;
                if (j1Var15 != null) {
                    bVar2.f2414c.remove(Integer.valueOf(j1Var15.f21727N.getId()));
                    ActivityRenewalLiveBinding j1Var16 = this.f18571b0;
                    if (j1Var16 != null) {
                        bVar2.m11470g(j1Var16.f21727N.getId()).f2418d.f2502z = "16:9";
                        ActivityRenewalLiveBinding j1Var17 = this.f18571b0;
                        if (j1Var17 != null) {
                            bVar2.m11470g(j1Var17.f21727N.getId()).f2418d.f2465c = -2;
                            ActivityRenewalLiveBinding j1Var18 = this.f18571b0;
                            if (j1Var18 != null) {
                                bVar2.m11470g(j1Var18.f21727N.getId()).f2418d.f2467d = 0;
                                ActivityRenewalLiveBinding j1Var19 = this.f18571b0;
                                if (j1Var19 != null) {
                                    int id3 = j1Var19.f21727N.getId();
                                    ActivityRenewalLiveBinding j1Var20 = this.f18571b0;
                                    if (j1Var20 != null) {
                                        bVar2.m11473d(id3, 3, j1Var20.f21740g0.getId(), 3);
                                        ActivityRenewalLiveBinding j1Var21 = this.f18571b0;
                                        if (j1Var21 != null) {
                                            int id4 = j1Var21.f21727N.getId();
                                            ActivityRenewalLiveBinding j1Var22 = this.f18571b0;
                                            if (j1Var22 != null) {
                                                bVar2.m11473d(id4, 4, j1Var22.f21740g0.getId(), 4);
                                                ActivityRenewalLiveBinding j1Var23 = this.f18571b0;
                                                if (j1Var23 != null) {
                                                    bVar2.m11476a(j1Var23.f21740g0);
                                                    ActivityRenewalLiveBinding j1Var24 = this.f18571b0;
                                                    if (j1Var24 != null) {
                                                        j1Var24.f21740g0.m4456s();
                                                        ActivityRenewalLiveBinding j1Var25 = this.f18571b0;
                                                        if (j1Var25 != null) {
                                                            ZoomView zoomView2 = j1Var25.f21740g0;
                                                            MutabilityOwnership.m3746l(zoomView2, "binding.zoomView");
                                                            ZoomView.m4452w(zoomView2, 1.0f, 0.0f, 0.0f, 6);
                                                            return;
                                                        }
                                                        MutabilityOwnership.m3737u("binding");
                                                        throw null;
                                                    }
                                                    MutabilityOwnership.m3737u("binding");
                                                    throw null;
                                                }
                                                MutabilityOwnership.m3737u("binding");
                                                throw null;
                                            }
                                            MutabilityOwnership.m3737u("binding");
                                            throw null;
                                        }
                                        MutabilityOwnership.m3737u("binding");
                                        throw null;
                                    }
                                    MutabilityOwnership.m3737u("binding");
                                    throw null;
                                }
                                MutabilityOwnership.m3737u("binding");
                                throw null;
                            }
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
        MutabilityOwnership.m3737u("binding");
        throw null;
    }

    @Override // p397oj.LiveChatStateRenderer
    /* renamed from: z0 */
    public void mo3246z0(boolean z) {
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.mo3799C(z);
            if (z) {
                ActivityRenewalLiveBinding j1Var2 = this.f18571b0;
                if (j1Var2 != null) {
                    j1Var2.f21740g0.setOnClickListener(new View$OnClickListenerC0181w7(this, 2));
                    ActivityRenewalLiveBinding j1Var3 = this.f18571b0;
                    if (j1Var3 != null) {
                        j1Var3.f21759w.setOnClickListener(new View$OnClickListenerC0161t7(this, 1));
                        ActivityRenewalLiveBinding j1Var4 = this.f18571b0;
                        if (j1Var4 != null) {
                            j1Var4.m11392i();
                            ActivityRenewalLiveBinding j1Var5 = this.f18571b0;
                            if (j1Var5 != null) {
                                LiveChatEditText liveChatEditText = j1Var5.f21757u;
                                if (liveChatEditText != null) {
                                    liveChatEditText.requestFocus();
                                    Object systemService = liveChatEditText.getContext().getSystemService("input_method");
                                    Objects.requireNonNull(systemService, "null cannot be cast to non-null type android.view.inputmethod.InputMethodManager");
                                    ((InputMethodManager) systemService).showSoftInput(liveChatEditText, 0);
                                    return;
                                }
                                return;
                            }
                            MutabilityOwnership.m3737u("binding");
                            throw null;
                        }
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
            ActivityRenewalLiveBinding j1Var6 = this.f18571b0;
            if (j1Var6 != null) {
                j1Var6.f21740g0.setOnClickListener(new View$OnClickListenerC0169u7(this, 1));
                ActivityRenewalLiveBinding j1Var7 = this.f18571b0;
                if (j1Var7 != null) {
                    j1Var7.f21759w.setOnClickListener(new View$OnClickListenerC0173v7(this, 1));
                    ActivityRenewalLiveBinding j1Var8 = this.f18571b0;
                    if (j1Var8 != null) {
                        C1124a.m10170v(j1Var8.f21757u);
                    } else {
                        MutabilityOwnership.m3737u("binding");
                        throw null;
                    }
                } else {
                    MutabilityOwnership.m3737u("binding");
                    throw null;
                }
            } else {
                MutabilityOwnership.m3737u("binding");
                throw null;
            }
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }

    @Subscribe(threadMode = ThreadMode.MAIN_ORDERED)
    public final void onEvent(SelectGiftingItemEvent selectGiftingItemEvent) {
        MutabilityOwnership.m3745m(selectGiftingItemEvent, "event");
        String str = this.f18572c0;
        if (str != null) {
            SketchLiveGiftingItem item = selectGiftingItemEvent.getItem();
            MutabilityOwnership.m3746l(item, "event.item");
            GiftAmountBottomSheetFragment g = GiftAmountBottomSheetFragment.m1510g(str, item);
            FragmentManager K0 = m11131K0();
            MutabilityOwnership.m3746l(K0, "supportFragmentManager");
            StringMerger.m2843s(K0, g, "gift_amount");
            return;
        }
        MutabilityOwnership.m3737u("liveId");
        throw null;
    }

    @Subscribe
    public final void onEvent(ShowYellAmountFromLiveInformation showYellAmountFromLiveInformation) {
        MutabilityOwnership.m3745m(showYellAmountFromLiveInformation, "event");
        String str = this.f18572c0;
        if (str != null) {
            Bundle bundle = new Bundle();
            bundle.putString("args_live_id", str);
            GiftSelectBottomSheetFragment giftSelectBottomSheetFragment = new GiftSelectBottomSheetFragment();
            giftSelectBottomSheetFragment.setArguments(bundle);
            FragmentManager K0 = m11131K0();
            MutabilityOwnership.m3746l(K0, "supportFragmentManager");
            StringMerger.m2843s(K0, giftSelectBottomSheetFragment, "gift_select");
            String str2 = this.f18572c0;
            if (str2 != null) {
                GiftAmountBottomSheetFragment g = GiftAmountBottomSheetFragment.m1510g(str2, showYellAmountFromLiveInformation.getItem());
                FragmentManager K02 = m11131K0();
                MutabilityOwnership.m3746l(K02, "supportFragmentManager");
                StringMerger.m2843s(K02, g, "gift_amount");
                return;
            }
            MutabilityOwnership.m3737u("liveId");
            throw null;
        }
        MutabilityOwnership.m3737u("liveId");
        throw null;
    }

    @Subscribe
    @SuppressLint({"CheckResult"})
    public final void onEvent(SendGiftingItemEvent sendGiftingItemEvent) {
        MutabilityOwnership.m3745m(sendGiftingItemEvent, "event");
        m4754g1().f23822c.mo2437b(LiveAction.C5289b0.f23772a);
        m4754g1().f23822c.mo2437b(LiveAction.C5325v.f23816a);
        ActivityRenewalLiveBinding j1Var = this.f18571b0;
        if (j1Var != null) {
            j1Var.f21717D.post(new RunnableC3037f(this, sendGiftingItemEvent, 3));
        } else {
            MutabilityOwnership.m3737u("binding");
            throw null;
        }
    }
}
